package main

import (
	"fmt"
 	"path"
)
func main() {
	paths := []string{
			"a/c",
			"a//c",
			"a/c/.",
			"a/c/b/..",
			"/../a/c",
			"/../a/b/../././/c",
	}

	for _, p := range paths {
		fmt.Printf("Clean(%q) = %q\n", p, path.Clean(p))
	}
	fmt.Println(path.Base("/etc/nginx/nginx.conf"))
	fmt.Println(path.Dir("/etc/nginx/nginx.conf"))
	fmt.Println(path.Ext("/etc/nginx/nginx.conf"))
	fmt.Println(path.Split("/etc/nginx/nginx.conf"))
	fmt.Println(path.IsAbs("/etc/nginx/nginx.conf"))
	fmt.Println(path.IsAbs("../nginx.conf"))
	fmt.Println(path.Join("usr","bin","sh"))

}
